﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.DomainServices.Server;
using System.Data.Objects.DataClasses;
using System.ComponentModel.DataAnnotations;

namespace Biciq.Datos
{   
    [MetadataType(typeof(ClienteMetadata))]
    public partial class Cliente
    {
       /// <summary>
       /// Metadatos en relación clientes 
       /// </summary>
        internal sealed class ClienteMetadata
        {
            [Include]
            public Pai  Pai;

            [Include]
            public TipoSuscripcion TipoSuscripcion;

            [Include]
            public Tarjeta Tarjeta;
           
            [Required(ErrorMessage = "Campo Obligatorio")]
            public string Apellidos
            {
                get;
                set;
            }

            [Required(ErrorMessage = "Campo Obligatorio")]
            public string Sexo
            {
                get;
                set;
            }
            /// <summary>
            /// prueba
            /// </summary>
            [Required(ErrorMessage = "Campo Obligatorio")]
            public string Direccion
            {
                get;
                set;
            }

           
            public string DirecionReferenciaF1
            {
                get;
                set;
            }

            //[Required(ErrorMessage = "Campo Obligatorio")]
            //public string DirecionReferenciaL1
            //{
            //    get;
            //    set;
            //}

            [Required(ErrorMessage = "Campo Obligatorio")]
            [StringLength(500, ErrorMessage = "La longitud máxima es 500 caracteres")]
            [RegularExpression(@"^[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,4}$", ErrorMessage = "Formato inválido")]
            public string Email
            {
                get;
                set;
            }

            [Required(ErrorMessage = "Campo Obligatorio")]
            public string FechaNacimiento
            {
                get;
                set;
            }

            [Required(ErrorMessage = "Campo Obligatorio")]
            public string Identificacion
            {
                get;
                set;
            }

            [Required(ErrorMessage = "Campo Obligatorio")]
            public string Mobil
            {
                get;
                set;
            }

            [Required(ErrorMessage = "Campo Obligatorio")]
            public string NivelInstruccion
            {
                get;
                set;
            }

            
            
            public string NombreReferenciaF1
            {
                get;
                set;
            }

            [Required(ErrorMessage = "Campo Obligatorio")]
            public string Nombres
            {
                get;
                set;
            }

            [Required(ErrorMessage = "Campo Obligatorio")]
            public string Ocupacion
            {
                get;
                set;
            }


            [Required(ErrorMessage = "Campo Obligatorio")]
            public Guid PaisId
            {
                get;
                set;
            }

            // [Required(ErrorMessage = "Campo Obligatorio")]
            //public string  TelefonoReferenciaF1
            //{
            //    get;
            //    set;
            //}
            // [Required(ErrorMessage = "Campo Obligatorio")]
            // public string  TelefonoReferenciaL1
            //{
            //    get;
            //    set;
            //}
             [Required(ErrorMessage = "Campo Obligatorio")]
             public string  Telefono
            {
                get;
                set;
            }

             [Required(ErrorMessage = "Campo Obligatorio")]
             public Guid TipoSuscripcionId
             {
                 get;
                 set;
             }


            [Include]
             public EntityCollection<ClienteBicicleta> ClienteBicicletas;
        }

    }
}
